import {_decorator, Component, Node} from 'cc';

const {ccclass, property} = _decorator;

@ccclass('SidePrefab')
export class SidePrefab extends Component {
    close() {
        this.node.active = false
        this.node.destroy()
    }

    join() {
        // @ts-ignore
        tt.navigateToScene({
            scene: "sidebar",
            success: (res) => {
                this.close();
            },
            fail: (res) => {
                console.log("navigate to scene fail: ", res);
            },
        });
    }
}


